package com.company.management.utils;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum ResultCode {
    SUCCESS(0, "Success"),
    FAILURE(1, "Failure"),

    ADD_SUCCESS(11000, "Add success"),
    ADD_FAILURE(11001, "Add failure"),
    DELETE_SUCCESS(11002, "Delete success"),
    DELETE_FAILURE(11003, "Delete failure"),
    UPDATE_SUCCESS(11004, "Update success"),
    UPDATE_FAILURE(11005, "Update failure"),
    QUERY_SUCCESS(11006, "Query success"),
    QUERY_FAILURE(11007, "Query failure"),
    CHECK_SUCCESS(11008, "Check success"),
    CHECK_FAILURE(11009, "Check failure"),

    LOGIN_SUCCESS(11010, "Login success"),
    LOGIN_FAILURE(11011, "Login failure"),
    REGISTER_SUCCESS(11012, "Register success"),
    REGISTER_FAILURE(11013, "Register failure"),
    LOGOUT_SUCCESS(11022, "Logout success"),
    LOGOUT_FAILURE(11023, "Logout failure"),

    BAN_USER_SUCCESS(11014, "Ban user success"),
    BAN_USER_FAILURE(11015, "Ban user failure"),

    BIND_ERROR(11017, "Bind error"),
    BIND_SUCCESS(11018, "Bind success"),
    BIND_FAILURE(11019, "Bind failure"),

    PROCESS_SUCCESS(11020, "Run success"),
    PROCESS_FAILURE(11021, "Run failure"),

    ERROR_SHIRO(11400, "SHIRO error"),
    ERROR_KEY(11401, "KEY error"),
    ERROR_KEY_INVALID(11402, "KEY invalid"),
    ERROR_KEY_EXPIRED(11403, "KEY expired"),
    ERROR_UNAUTHORIZED(11405, "Unauthorized"),
    ERROR_UNAUTHENTICATED(11406, "Unauthenticated"),
    ERROR_EXCEPTION(11404, "Global exception"),

    ERROR_ACCOUNT(11505, "Account unknown error"),
    ERROR_ACCOUNT_NULL(11506, "Account not existed"),
    ERROR_ACCOUNT_BAN(11507, "Account baned"),
    ERROR_ACCOUNT_NO_MONEY(11508, "Account no money"),

    SEND_SUCCESS(11101, "Send success"),
    SEND_FAILURE(11102, "Send failure");

    public Integer code;
    public String msg;
}
